package com.ruoyi.machine.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.machine.mapper.SysSimDeviceMapper;
import com.ruoyi.machine.domain.SysSimDevice;
import com.ruoyi.machine.service.ISysSimDeviceService;

/**
 * 自助设备Service业务层处理
 * 
 * @author laifolai
 * @date 2023-02-07
 */
@Service
public class SysSimDeviceServiceImpl implements ISysSimDeviceService 
{
    @Autowired
    private SysSimDeviceMapper sysSimDeviceMapper;

    /**
     * 查询自助设备
     * 
     * @param deviceId 自助设备主键
     * @return 自助设备
     */
    @Override
    public SysSimDevice selectSysSimDeviceByDeviceId(Long deviceId)
    {
        return sysSimDeviceMapper.selectSysSimDeviceByDeviceId(deviceId);
    }

    /**
     * 查询自助设备列表
     * 
     * @param sysSimDevice 自助设备
     * @return 自助设备
     */
    @Override
    public List<SysSimDevice> selectSysSimDeviceList(SysSimDevice sysSimDevice)
    {
        return sysSimDeviceMapper.selectSysSimDeviceList(sysSimDevice);
    }

    /**
     * 新增自助设备
     * 
     * @param sysSimDevice 自助设备
     * @return 结果
     */
    @Override
    public int insertSysSimDevice(SysSimDevice sysSimDevice)
    {
        sysSimDevice.setCreateTime(DateUtils.getNowDate());
        return sysSimDeviceMapper.insertSysSimDevice(sysSimDevice);
    }

    /**
     * 修改自助设备
     * 
     * @param sysSimDevice 自助设备
     * @return 结果
     */
    @Override
    public int updateSysSimDevice(SysSimDevice sysSimDevice)
    {
        return sysSimDeviceMapper.updateSysSimDevice(sysSimDevice);
    }

    /**
     * 批量删除自助设备
     * 
     * @param deviceIds 需要删除的自助设备主键
     * @return 结果
     */
    @Override
    public int deleteSysSimDeviceByDeviceIds(Long[] deviceIds)
    {
        return sysSimDeviceMapper.deleteSysSimDeviceByDeviceIds(deviceIds);
    }

    /**
     * 删除自助设备信息
     * 
     * @param deviceId 自助设备主键
     * @return 结果
     */
    @Override
    public int deleteSysSimDeviceByDeviceId(Long deviceId)
    {
        return sysSimDeviceMapper.deleteSysSimDeviceByDeviceId(deviceId);
    }
}
